//
//  YLYAddNewBillViewController.h
//  iAccounts
//
//  Created by 楊盧银Mac on 14-4-26.
//  Copyright (c) 2014年 com.yly16. All rights reserved.
//
#define AH_AUTORELEASE(x) x
#import <UIKit/UIKit.h>
#import "YLYCalculatorView.h"
#import "iBillType.h"
#import <CoreLocation/CoreLocation.h>

typedef enum{
    pickerViewTypeBillType = 0,
    pickerViewTypeBillAccount,
    pickerViewTypeBillDate
}pickerViewType;
@interface YLYAddNewBillViewController : UIViewController<YLYCalculatorViewDelegate,UIPickerViewDataSource,UIPickerViewDelegate,CLLocationManagerDelegate>
{
    NSDate *dtForMonth;
    NSString *typeStr;
    
    iBillTypeSub *_typeSub;
    iBillAccountSub *_accountSub;
    pickerViewType *_pickerType;//判断是否为消费类别,是否为时间选择
    iBillNote *_currentNote;//当前账本
}
@property (nonatomic,strong)CLLocationManager* locationManager;

@property (nonatomic,strong)NSNumber *latitude;
@property (nonatomic,strong)NSNumber *longitude;

@property (strong, nonatomic) NSString *MoneyNumberStr;
@property (weak, nonatomic) IBOutlet YLYCalculatorView *KeyView;
@property (weak, nonatomic) IBOutlet UIView *ChooseView;
@property (weak, nonatomic) IBOutlet UIPickerView *iPickerView;
@property (weak, nonatomic) IBOutlet UIDatePicker *iDataPicker;
@property (weak, nonatomic) IBOutlet UISegmentedControl *BillPayOutSegment;

@property (strong, nonatomic) IBOutletCollection(UIView) NSArray *CellBGViewArray;
@property (weak, nonatomic) IBOutlet UILabel *MoneyNumberTextView;

@property (weak, nonatomic) IBOutlet UILabel *BillTypeLabel;
@property (weak, nonatomic) IBOutlet UILabel *billDateLabel;

@property (weak, nonatomic) IBOutlet UIImageView *typeImageView;
@property (weak, nonatomic) IBOutlet UIImageView *acountImageView;
@property (weak, nonatomic) IBOutlet UIImageView *dateImageView;
@property (weak, nonatomic) IBOutlet UITextView *billRemarkTextView;
@property (weak, nonatomic) IBOutlet UILabel *billAccountLabel;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *typeEditBarButton;
@property (weak, nonatomic) IBOutlet UIImageView *billImageVIew;


@property (strong , nonatomic)NSData *photoData;//图片选择
@property (strong , nonatomic)NSMutableArray *Typelist;
@property (strong , nonatomic)NSMutableArray *Detaillist;
@property (strong , nonatomic)iBill *aBill;

- (IBAction)showChooseView:(UIButton *)sender;
- (IBAction)showBillAcountChoose:(UIButton *)sender;
- (IBAction)showDateChoose:(UIButton *)sender;
- (IBAction)quitChooseView:(UIBarButtonItem *)sender;
- (IBAction)editBillType:(UIBarButtonItem *)sender;
- (IBAction)quitkeyboard:(id)sender;
- (IBAction)addnewBill:(UIBarButtonItem *)sender;
- (IBAction)chooseBillImageFromPhoto:(UIButton *)sender;
- (IBAction)chooseBillDate:(UIDatePicker *)sender;






@end
